
Version:=0.7.18
ModuleName:=frox

Objcet:=$(ModuleName).tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjcetSource:=$(ModuleName)-$(Version).tar.bz2

DependFiles:=
InstaEtcDir:=usr/local/etc
InstaLibDir:=usr/lib
InstaSbinDir:=usr/local/sbin

InstallDirTmp:=usr/local/
InstallDir:=/$(InstallDirTmp)
ManDir:=/tmp

Config:=./configure --prefix=$(InstallDir) --enable-virus-scan \
	--enable-transparent-data --enable-ssl --enable-libiptc --enable-run-as-root 

Patch:=patch -p0 < frox.patch

.PHONY: all clean dist_clean

all:$(Objcet) 

$(Objcet):$(ObjcetSource) frox.conf
	tar -xjf $(ObjcetSource)
	$(Patch)
	cd $(ObjectDir); $(Config) ;make clean
	$(MAKE) -C $(ObjectDir)
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	mkdir -p $(InstaEtcDir);cp frox.conf $(InstaEtcDir)
	tar -czf $(Objcet) usr

patch:
	mv $(ObjectDir) $(ObjectDir).new
	rm $(ObjectDir) -rf 
	tar -xjf $(ObjcetSource)
	diff -Nur $(ObjectDir) $(ObjectDir).new > frox.patch

clean:
	rm -rf $(Objcet) usr var etc

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjcetSource) 
	
include ../Makefile.Res
